﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace GPSpeedView.GPHelpers
{
    public class CommonHelper
    {
        public static bool IsValidCode(string code,string name)
        {
            if (!ConfigData.Show60GP && code.StartsWith("60")
                || (!ConfigData.Show00GP && code.StartsWith("00"))
                || (!ConfigData.Show30GP && code.StartsWith("30"))
                || (!ConfigData.Show43GP && code.StartsWith("43"))
                || (!ConfigData.ShowSTGP && name.Contains("ST"))
                || (!code.StartsWith("60")
                && !code.StartsWith("00")
                && !code.StartsWith("30")
                && !code.StartsWith("43")))
            {
                return false;
            }
            return true;
        }
    }
}
